<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	request.setCharacterEncoding("EUC-KR");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="/style.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>회원가입</title>
<script type="text/javascript">
<!--
function openUsers() {
	window.open("/cont/listUserForLogInfo.htm","user","width=800,height=600");
}

function checkId() {
	window.open("/cont/checkLoginId.htm?loginId=" + document.form.loginId.value ,"check","width=400,height=200");
} 
function checkLogInfo(frm){
	alert( frm.checkid.value);
	if(frm.checkid.value == 0)
		if(frm.checkuser.value == 0)
			return true;
		else
			alert("사용자를 입력해주세요");
	else
		alert("아이디 중복 체크를 해주십시오" + frm.checkid.value);
	return false;

}
//-->
</script>
</head>
<body>
<center>
<h1>회원 가입</h1>
<form:form name="form" commandName="logInfo" method="post" enctype="UTF-8" onsubmit="return checkLogInfo(this)">
	<input type="hidden" name="mode" value="${mode}" />
	<input type="hidden" name="checkid" value="1" />
	<input type="hidden" name="checkuser" value="1" />
	<table border="1" >
		<tr align="center">
			<td>아이디 : </td>
			<td ><form:input path="loginId" /></td>
		</tr>
		<tr align="center">
			<td colspan="2"><input type="button" value="Check ID" onclick="javascript:checkId();"/></td>
		</tr>
		<tr align="center">
			<td>패스워드 : </td>
			<td><form:password path="loginPw" /></td>
		</tr>
		<tr align="center">
			<td colspan="2"><input type="button" value="Search User" onclick="javascript:openUsers();"/></td>
		</tr>
		<tr align="center">
			<td>사용자 번호 : </td>
			<td><form:input path="userId" /></td>
		</tr>
		<tr align="center">
			<td>사용자 이름 : </td>
			<td ><input type="text" disabled="true" name="name"/></td>
		</tr>
		<tr align="center">
			<td>사용자 나이 : </td>
			<td ><input type="text" disabled="true" name="age"/></td>
		</tr>
		<tr>
			<td colspan="2" align="right"><input type="submit" value="Submit" /></td>
		</tr>
	</table>
</form:form>
</body>
</html>